package com.training.food.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.training.food.Mapper.InitialpurMapper;
import com.training.food.pojo.Initialpur;
import com.training.food.service.InitialpurService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class InitialpurServiceImpl extends ServiceImpl<InitialpurMapper, Initialpur> implements InitialpurService {
    @Autowired
    InitialpurMapper initialpurMapper;
    @Override
    public boolean select(Initialpur initialpur) {
        if(initialpurMapper.select(initialpur)!=null)return true;
        return false;
    }

    @Override
    public void add(Initialpur initialpur) {
        initialpurMapper.insert(initialpur);
    }

    @Override
    public void sub(Initialpur initialpur) {
        initialpurMapper.delete(initialpur);
    }

    @Override
    public List<Initialpur> list(int WSmarketId) {
        return initialpurMapper.list(WSmarketId);
    }
}
